package cn.mapper;

import org.apache.ibatis.jdbc.SQL;

public class DetailProvider {

    public String detailList(Long id){
        return new SQL(){{
            SELECT("d.*,wa.name waste_name,wt.name waste_type_name,wa.`code` waste_code,wt.code watse_type_code");
            FROM("detail d");
            LEFT_OUTER_JOIN("waste wa on d.waste_id=wa.id left join waste_type wt on d.waste_type_id=wt.id");
            WHERE("d.del_flag=0 and d.work_order_id=#{id}");
        }}.toString();
    }
}
